from selenium.webdriver.common.by import By

from common.Utils import BlogDriver


#测试博客详情页
class BlogDetail:
    url = ""
    driver = ""
    def __init__(self):
        self.url = "详情页网址"
        self.driver = BlogDriver.driver
        self.driver.get(self.url)

    #登录状态下博客详情页测试
    def DetailTestByLogin(self):
        #检查标题
        self.driver.find_element(By.CSS_SELECTOR, "标题标签")
        #检查时间
        self.driver.find_element(By.CSS_SELECTOR, "时间标签")
        #检查内容
        self.driver.find_element(By.CSS_SELECTOR, "内容标签")
        #屏幕截图
        BlogDriver.getScreeShot()
